IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'DnsRecordCreate')
	BEGIN
		DROP  Procedure  DnsRecordCreate
	END

GO

CREATE Procedure DnsRecordCreate
(
	@websiteId int,
	@typeFlag int,
	@title nvarchar(200),
	@value nvarchar(200),
	@ttl int,
	@priority int,
	@dnsRecordId int OUTPUT
)
AS

INSERT INTO DnsRecords
	(WebsiteId, TypeFlag, Title, Value, TTL, Priority)
VALUES
	(@websiteId, @typeFlag, @title, @value, @ttl, @priority)
	
SET @dnsRecordId = SCOPE_IDENTITY()

GO